﻿<!-- 
<copyright file="AssemblerPane.xaml" company="Microsoft">
    //  Copyright (c) Microsoft Corporation.  All rights reserved.
</copyright>
<summary>
    // Assembler pane will host sequence view and consensus view.
    // Assembler pane will display Sequence and Consensus tree view
    // along with selected sequences,assembly report etc.
</summary> 
-->
<UserControl x:Class="SequenceAssembler.AssemblerPane"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	xmlns:SequenceAssembler="clr-namespace:SequenceAssembler" d:DesignHeight="300">
    <UserControl.Resources>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" x:Key="AddedTreeViewItemBrush">
            <GradientStop Color="#FFDAF58B" Offset="0"/>
            <GradientStop Color="#FF9CD500" Offset="1"/>
            <GradientStop Color="#FFB9E73D" Offset="0.647"/>
        </LinearGradientBrush>
        <Style x:Key="TreeViewItemFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <PathGeometry x:Key="TreeArrow" Figures="M0,0 L0,6 L6,0 z"/>
        <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Focusable" Value="False"/>
            <Setter Property="Width" Value="16"/>
            <Setter Property="Height" Value="16"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border Width="16" Height="16" Background="Transparent" Padding="5,5,5,5">
                            <Path Fill="Transparent" Stroke="#FF989898" x:Name="ExpandPath" Data="{StaticResource TreeArrow}">
                                <Path.RenderTransform>
                                    <RotateTransform Angle="135" CenterX="3" CenterY="3"/>
                                </Path.RenderTransform>
                            </Path>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Stroke" TargetName="ExpandPath" Value="#FF1BBBFA"/>
                                <Setter Property="Fill" TargetName="ExpandPath" Value="Transparent"/>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="True">
                                <Setter Property="RenderTransform" TargetName="ExpandPath">
                                    <Setter.Value>
                                        <RotateTransform Angle="180" CenterX="3" CenterY="3"/>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Fill" TargetName="ExpandPath" Value="#FF595959"/>
                                <Setter Property="Stroke" TargetName="ExpandPath" Value="#FF262626"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ConsensusTreeViewItem" TargetType="{x:Type TreeViewItem}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
            <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
            <Setter Property="Padding" Value="1,0,0,0"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TreeViewItem}">
                        <Grid Margin="0,1,0,1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="16"/>
                                <ColumnDefinition x:Name="columnDefinition"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <ToggleButton x:Name="Expander" Style="{StaticResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Margin="0,0.48,0,0.48"/>
                            <Border x:Name="Bd" SnapsToDevicePixels="true" Grid.Column="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2,2,2,2" Margin="0,0,0,0" HorizontalAlignment="Left">
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" Margin="4,0,4,1"/>
                            </Border>
                            <ItemsPresenter x:Name="ItemsHost" Grid.Column="1" Grid.Row="1" Margin="1,0,0,0" d:LayoutOverrides="GridBox"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsExpanded" Value="false">
                                <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="HasItems" Value="false">
                                <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="#FF097CCC"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="#FFC4C4C4"/>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ConsensusTreeViewItemAdded" TargetType="{x:Type TreeViewItem}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
            <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
            <Setter Property="Padding" Value="1,0,0,0"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TreeViewItem}">
                        <Grid Margin="0,1,0,1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="16"/>
                                <ColumnDefinition x:Name="columnDefinition"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <ToggleButton x:Name="Expander" Style="{StaticResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Margin="0,0.48,0,0.48"/>
                            <Border x:Name="Bd" SnapsToDevicePixels="true" Grid.Column="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="2,2,2,2" Margin="0,0,0,0" HorizontalAlignment="Left">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFDAF58B" Offset="0"/>
                                        <GradientStop Color="#FF9CD500" Offset="1"/>
                                        <GradientStop Color="#FFB9E73D" Offset="0.647"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" Margin="4,0,4,1"/>
                            </Border>
                            <ItemsPresenter x:Name="ItemsHost" Grid.Column="1" Grid.Row="1" Margin="1,0,0,0" d:LayoutOverrides="GridBox"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsExpanded" Value="false">
                                <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="HasItems" Value="false">
                                <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
                            </Trigger>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="#FF097CCC"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="#FFC4C4C4"/>
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="TreeItemToolTip" TargetType="{x:Type ToolTip}">
            <Setter Property="VerticalOffset" Value="-10" />
            <Setter Property="HorizontalOffset" Value="20" />
            <Setter Property ="Foreground" Value="Black"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToolTip}">
                        <Border HorizontalAlignment="Left" Width="296" Grid.Row="1" CornerRadius="10,10,10,10" BorderThickness="1,1,1,1" BorderBrush="#FFEAB934" Padding="10,10,10,10" VerticalAlignment="Top">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFFCB0" Offset="0"/>
                                    <GradientStop Color="#FFFFFBB4" Offset="1"/>
                                    <GradientStop Color="#FFF5EF71" Offset="0.277"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Top" ></ContentPresenter>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid Opacity="1" Visibility="Visible">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid Visibility="Visible" Background="#FFFFFFFF">
                <!--Display sequence view and consensus view..-->
                <SequenceAssembler:ExpanderAccordion  VerticalAlignment="Top" HorizontalAlignment="Left">
                    <SequenceAssembler:ExpanderAccordion.Resources>
                        <Style TargetType="SequenceAssembler:VerticalDragThumb">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate>
                                        <Border Background="Gainsboro" Height="2" HorizontalAlignment="Stretch" Margin="0,0,0,0" />
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </SequenceAssembler:ExpanderAccordion.Resources>
                    <SequenceAssembler:ExpanderAccordion.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFE0E0E0" Offset="0"/>
                            <GradientStop Color="#FFCFCFCF" Offset="1"/>
                        </LinearGradientBrush>
                    </SequenceAssembler:ExpanderAccordion.Background>
                    
                    <!-- Display sequence view -->
                    <Expander x:Name="sequenceViewExpander" Margin="5,5,5,2" MinHeight="40" BorderBrush="#FF84A5B8" BorderThickness="2,2,2,2" FontSize="18" FontWeight="Bold" IsExpanded="True" Header="{DynamicResource AssemblerPane_SequenceView}" Padding="4,4,0,0" Background="#FFF1F1F1" HorizontalAlignment="Stretch">
                        <Grid Margin="-4,0,0,0">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.25*"/>
                                    <ColumnDefinition Width="*" MinWidth="200"/>
                                </Grid.ColumnDefinitions>
                                <GridSplitter Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="2" Background="Gainsboro" />
                                <Grid Opacity="1" Margin="2,0,0,0" RenderTransformOrigin="0.5,0.5" Visibility="Visible" Background="#FFFFFFFF" Grid.Column="1" x:Name="AssemblyGrid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>

                                    <!-- Display Heading -->
                                    <Rectangle Stroke="{x:Null}">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFD1E6F2" Offset="0"/>
                                                <GradientStop Color="#FF90B0C2" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle Stroke="{x:Null}" Grid.Row="2">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FFDCDCDC" Offset="0"/>
                                                <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <TextBlock VerticalAlignment="Center" Text="{DynamicResource AssemblerPane_SelectedSequences}" Padding="0,5,0,0" Height="30" TextWrapping="Wrap" Margin="5,0,0,0" FontSize="12" FontWeight="Bold" />
                                    <!-- Display SequenceItemViewer -->
                                    <Grid x:Name="sequenceViewer" AllowDrop="True" Margin="0" Grid.Row="1" Background="WhiteSmoke">
                                        <SequenceAssembler:ConsensusCustomView VerticalAlignment="Stretch" HorizontalAlignment="Stretch" x:Name="customSequenceView" FontWeight="Normal" IsLegendVisible="False" IsTopViewVisible="False" IdleText="{DynamicResource AssemblerPane_SequenceViewGhostText}" />
                                    </Grid>
                                    <Grid Margin="8,0,8,0" VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Stretch" Height="50">
                                        <DockPanel>
                                            <DockPanel x:Name="assemblePane" VerticalAlignment="Center" Visibility="Visible" HorizontalAlignment="Stretch" DockPanel.Dock="Left">
                                                <Button DockPanel.Dock="Left" ToolTipService.ShowOnDisabled="True" ToolTip="{DynamicResource AssemblerPane_Assemble_ToolTip}" FocusVisualStyle="{x:Null}" x:Name="btnAssemble" IsEnabled="False" Margin="2,0,0,0" Style="{DynamicResource WebServiceButton}" Height="25" Content="{DynamicResource AssemblerPane_Assemble}" FontSize="12" Visibility="Visible" FontWeight="Normal" Width="80"/>
                                                <Button DockPanel.Dock="Left" ToolTipService.ShowOnDisabled="True" ToolTip="{DynamicResource AssemblerPane_Align_ToolTip}" FocusVisualStyle="{x:Null}" x:Name="btnAlign" IsEnabled="False" Margin="5,0,0,0" Style="{DynamicResource WebServiceButton}" Height="25" Content="{DynamicResource AssemblerPane_Align}" FontSize="12" Visibility="Visible" FontWeight="Normal" Width="80"/>
                                            </DockPanel>
                                            <StackPanel x:Name="sequenceViewZoomPanel" Visibility="Hidden" Orientation="Horizontal" DockPanel.Dock="Right" Width="Auto" HorizontalAlignment="Right" VerticalAlignment="Center">
                                                <TextBlock Margin="10,0,5,0" FontSize="12" FontWeight="Normal" Text="{DynamicResource AssemblerPane_Zoom}" />
                                                <Slider x:Name="sequenceViewZoomSlider" Margin="5,0,10,0" Width="100" Value="14" Minimum="2" Maximum="22" SmallChange="1" ValueChanged="OnSequenceViewZoomSliderValueChanged" />
                                            </StackPanel>
                                        </DockPanel>

                                        <!-- Display Progress Bar -->
                                        <StackPanel x:Name="assembleProgress" Visibility="Hidden" Orientation="Horizontal" d:LayoutOverrides="Height">
                                            <SequenceAssembler:ProgressAnimation/>
                                            <StackPanel Margin="5,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
                                                <TextBlock  Foreground="#FF4D4D4D" TextWrapping="Wrap" FontWeight="Bold" FontSize="14"><TextBlock x:Name="assemblyInProgressText" Text="{DynamicResource Assembling_Sequences_Text}"/><LineBreak/><TextBlock FontSize="12" FontWeight="Normal" Text="{DynamicResource Time_Text}"/></TextBlock>
                                                <Button FocusVisualStyle="{x:Null}" x:Name="btnCancelAssembly" HorizontalAlignment="Left" Margin="10,0,0,0" Style="{DynamicResource WebServiceButton}" VerticalAlignment="Center" Content="Cancel" FontSize="12" FontWeight="Normal"/>
                                            </StackPanel>
                                        </StackPanel>
                                    </Grid>
                                </Grid>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="30"/>
                                        <RowDefinition Height="*"/>
                                    </Grid.RowDefinitions>
                                    <Rectangle Stroke="{x:Null}">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#FF81AAC1" Offset="0"/>
                                                <GradientStop Color="#FF2D6B8E" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <TextBlock Margin="5,5.69,101.907,5.69" FontWeight="Bold" Foreground="#FFFFFFFF" Text="{DynamicResource AssemblerPane_SequenceTreeView}" d:LayoutOverrides="Width, Height" FontSize="12"/>
                                    <ScrollViewer  Padding="5,5,5,5" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Grid.Row="1" FontSize="12" FontWeight="Normal"
                                                       Template="{DynamicResource GenericScrollViewer}">
                                        <TreeView x:Name="sequenceTree" Background="#00FFFFFF" BorderBrush="#00828790" Visibility="Visible"  />
                                    </ScrollViewer>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Expander>

                    <!-- Display consensus view -->
                    <Expander x:Name="consensusViewExpander" IsEnabled="False" Margin="5,2,5,2" MinHeight="40" BorderBrush="#FF84A5B8" BorderThickness="2,2,2,2" FontSize="18" FontWeight="Bold" Header="{DynamicResource AssemblerPane_ContigsView}" Padding="4,4,0,0" Background="#FFF1F1F1" HorizontalAlignment="Stretch">
                        <Grid Margin="-4,0,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.25*"/>
                                <ColumnDefinition Width="*" MinWidth="200"/>
                            </Grid.ColumnDefinitions>
                            <GridSplitter Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="2" Background="Gainsboro" />

                            <Grid Opacity="1" RenderTransformOrigin="0.5,0.5" Visibility="Visible" Grid.Column="1" Margin="2,0,0,0">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform X="0" Y="0"/>
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="50"/>
                                </Grid.RowDefinitions>

                                <!-- Display Header -->
                                <Rectangle Stroke="{x:Null}">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFD1E6F2" Offset="0"/>
                                            <GradientStop Color="#FF90B0C2" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>

                                <!-- Display Assembly results in the tab control -->
                                <TabControl x:Name="assemblyResultTab" Style="{DynamicResource AssemblyReportTabControl}" BorderThickness="0,1,0,0" IsSynchronizedWithCurrentItem="True" Margin="0,-23,0,0" FontSize="12" FontWeight="Normal" Grid.Row="1">
                                    <TabItem Header="{DynamicResource AssemblerPane_AssemblyReport}" Style="{DynamicResource MainLevelTabItem}" Background="#FFC6D0D5">
                                        <Grid>
                                            <ScrollViewer VerticalScrollBarVisibility="Auto" Padding="0,0,3,0" Template="{DynamicResource GenericScrollViewer}">
                                                <StackPanel Visibility="Collapsed" x:Name="stkAssemblyReport">
                                                    <Grid Margin="0,5,0,5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" FontSize="14" Text="{DynamicResource AssemblerPane_Input_Sequence}" TextAlignment="Right" TextWrapping="Wrap" d:LayoutOverrides="Width"/>
                                                        <TextBlock x:Name="txtInputSequence" TextWrapping="Wrap" Grid.Column="1" FontSize="14" FontWeight="Bold" d:LayoutOverrides="Width, Height"/>
                                                    </Grid>
                                                    <Grid Margin="0,5,0,5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource AssemblerPane_Alignment_Algo}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right"/>
                                                        <TextBlock x:Name="txtAlignmentAlgorithm" TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                    <Grid Margin="0,5,0,5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="*"/>
                                                            <RowDefinition Height="*"/>
                                                        </Grid.RowDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource AssemblerPane_ProcessingTime}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right"/>
                                                        <TextBlock x:Name="txtTotalTime" TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                    <Grid Grid.Row="0" Margin="0,5,0,5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource AssemblerPane_StartTime}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right"/>
                                                        <TextBlock x:Name="txtStartTime" TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                    <Grid Grid.Row="1" Margin="0,5,0,5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource AssemblerPane_EndTime}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right"/>
                                                        <TextBlock x:Name="txtEndTime" TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                    <Grid Margin="0,5,0,5">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock x:Name="numberOfContigsLabel" HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource AssemblerPane_NoOfContigs}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right" />
                                                        <TextBlock x:Name="txtContigs" TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                    <Grid Margin="0,5,0,5" x:Name="txtUnAssembledCountGrid">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource UnAssembled}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right"/>
                                                        <TextBlock x:Name="txtUnAssembled"  TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                    <Grid Margin="0,5,0,5" x:Name="txtLengthGrid">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="250"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock HorizontalAlignment="Right" Margin="0,0,5,0" VerticalAlignment="Top" Text="{DynamicResource Output_Length}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontSize="14" TextAlignment="Right"/>
                                                        <TextBlock  x:Name="txtLength" TextWrapping="Wrap" Grid.Column="1" FontWeight="Bold" d:LayoutOverrides="Width, Height" FontSize="14"/>
                                                    </Grid>
                                                </StackPanel>
                                            </ScrollViewer>
                                        </Grid>
                                    </TabItem>
                                    <TabItem x:Name="customViewTab" IsEnabled="True" Header="{DynamicResource AssemblerPane_CustomView}" Style="{DynamicResource MainLevelTabItem}" Background="#FFC6D0D5">
                                        <SequenceAssembler:ConsensusCustomView x:Name="consensusCustomView" IdleText="{DynamicResource Consensus_GhostText}" Loaded="OnCustomViewLoaded"/>
                                    </TabItem>
                                </TabControl>
                                <Rectangle Stroke="{x:Null}" Grid.Row="2">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFDCDCDC" Offset="0"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Grid Margin="8,0,8,0" Grid.Row="2" d:LayoutOverrides="Height" VerticalAlignment="Center">

                                    <!-- Display Progress Bar -->
                                    <StackPanel x:Name="stkWebProgressBar" Visibility="Collapsed" d:LayoutOverrides="Height" Orientation="Horizontal">
                                        <SequenceAssembler:ProgressAnimation/>
                                        <StackPanel VerticalAlignment="Center" Margin="5,0,0,0" Orientation="Horizontal">
                                            <TextBlock Foreground="#FF4D4D4D" TextWrapping="Wrap" FontWeight="Bold" FontSize="14"><TextBlock Text="{DynamicResource Executing_Search_Text}"/><LineBreak/><TextBlock FontSize="12" FontWeight="Normal" Text="{DynamicResource Time_Text}"/></TextBlock>
                                            <Button x:Name="cancelServiceBtn" FocusVisualStyle="{x:Null}" Content="{DynamicResource AssemblerPane_ProgressBarCancel}" FontSize="12" FontWeight="Normal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" Style="{DynamicResource WebServiceButton}"/>
                                        </StackPanel>
                                    </StackPanel>

                                    <!-- Display Web service selection controls and zoom slider-->
                                    <StackPanel VerticalAlignment="Center" HorizontalAlignment="Stretch">
                                        <DockPanel>
                                            <DockPanel x:Name="stkWebService" Visibility="Visible" DockPanel.Dock="Left">
                                                <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="{DynamicResource AssemblerPane_SelectService}" TextWrapping="Wrap" FontSize="12"/>
                                                <ComboBox x:Name="cmbWebServices" Margin="5,0,0,0" Height="23" IsSynchronizedWithCurrentItem="True" FontSize="12" FontWeight="Normal" />
                                                <Button ToolTipService.ShowOnDisabled="True" ToolTip="{DynamicResource AssemblerPane_Search_ToolTip}" x:Name="executeServiceBtn" FocusVisualStyle="{x:Null}" Margin="2,0,0,0" Style="{DynamicResource WebServiceButton}" Height="24" Content="{DynamicResource AssemblerPane_ExecuteSearch}" FontSize="12" Visibility="Visible"/>
                                            </DockPanel>
                                            <StackPanel x:Name="consensusViewZoomPanel" Orientation="Horizontal" Width="Auto" HorizontalAlignment="Right" VerticalAlignment="Center">
                                                <TextBlock Margin="10,0,5,0" FontSize="12" FontWeight="Normal" Text="{DynamicResource AssemblerPane_Zoom}" />
                                                <Slider x:Name="consensusViewZoomSlider" Margin="5,0,10,0" Width="100" Value="14" Minimum="2" Maximum="22" SmallChange="1" ValueChanged="OnConsensusViewZoomSliderValueChanged" />
                                            </StackPanel>
                                        </DockPanel>
                                    </StackPanel>
                                </Grid>
                            </Grid>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Rectangle Stroke="{x:Null}">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FF81AAC1" Offset="0"/>
                                            <GradientStop Color="#FF2D6B8E" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <TextBlock x:Name="consensusTreeViewCaption" Margin="5,5.69,101.907,5.69" FontWeight="Bold" Foreground="#FFFFFFFF" Text="{DynamicResource AssemblerPane_ContigsTreeView}" FontSize="12" d:LayoutOverrides="Width, Height"/>
                                <ScrollViewer  Padding="5,5,5,5" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Grid.Row="1" FontSize="12" FontWeight="Normal" Template="{DynamicResource GenericScrollViewer}">
                                    <TreeView x:Name="consensusTree" Background="#00FFFFFF" BorderBrush="#00828790" Visibility="Visible" >
                                        <TreeViewItem x:Name="treeViewConsensus" AllowDrop="True" Header="Contigs" IsExpanded="True" Style="{DynamicResource ConsensusTreeViewItem}" ItemContainerStyle="{DynamicResource ConsensusTreeViewItem}" />
                                    </TreeView>
                                </ScrollViewer>

                            </Grid>
                        </Grid>
                    </Expander>

                    <!-- Display BLAST output view -->
                    <Expander x:Name="blastResultsExpander" IsEnabled="False" IsExpanded="False" Margin="5,2,5,5" MinHeight="40" BorderBrush="#FF84A5B8" BorderThickness="2,2,2,2" FontSize="18" FontWeight="Bold" Header="{DynamicResource SequenceAssembly_WebServiceHeading}" Padding="4,4,0,0" Background="#FFF1F1F1" HorizontalAlignment="Stretch">
                        <SequenceAssembler:BlastPane x:Name="webServicePresenter" Margin="0,-18,0,0" Width="Auto" Height="Auto" Visibility="Visible" FontSize="12" FontWeight="Normal"/>
                    </Expander>
                </SequenceAssembler:ExpanderAccordion>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
